Pensieve Header: Wheeled Semi-Symmetrized calculus in the 2D quotient: Solving for the “conj” coefficients.

SetDirectory["C:\\drorbn\\AcademicPensieve\\Projects\\w-Computations"]

ar[i_,j_] := t[i]h[j]

μCollect[μ_] := Collect[μ, _h, Collect[#, _t, FullSimplify]&];
μForm[μ_] := Module[
{tails, heads, mat},
tails = Union[Cases[μ, t[s_] :> s, Infinity]];
heads = Union[Cases[μ, h[s_] :> s, Infinity]];
mat = Outer[Coefficient[μ, h[#1] t[#2]]&, heads, tails];
PrependTo[mat, t /@ tails];
mat = Prepend[Transpose[mat],
Prepend[h /@ heads, μ /. (h[_]|t[_]) -> 0]
];
MatrixForm[mat]
]

hm[x_,y_,z_][μ_] := Module[
{ξ, η},
ξ = D[μ, h[x]];
η = D[μ, h[y]];
μCollect[(μ /. h[x|y]->0) + ξ h[z] + (1+ξ /. t[i_]:>c[i])η h[z]]
]

hm[3,4,5][ar[1,3]+ar[2,4]]

hm[3,4,5][ar[1,3]+ar[2,4]] // μForm

μ1=ar[1,4]+ar[2,5]+ar[3,6]

μ1 // μForm

hm[4,5,7][μ1]

hm[7,6,8][hm[4,5,7][μ1]]

hm[4,7,8][hm[5,6,7][μ1]] // μForm

hm[7,6,8][hm[4,5,7][μ1]] - hm[4,7,8][hm[5,6,7][μ1]]

hfac[z_, xtails_List -> x_, y_][μ_] := Module[
{ytails},
ytails = Complement[
Union[Cases[μ, t[s_] :> s, Infinity]],
xtails
];
hfac[z,xtails -> x, ytails -> y][μ]
];
hfac[z_, x_,  ytails_List -> y_][μ_] := Module[
{xtails},
xtails = Complement[
Union[Cases[μ, t[s_] :> s, Infinity]],
ytails
];
hfac[z,xtails -> x, ytails -> y][μ]
];
hfac[z_, xtails_List -> x_, ytails_List -> y_][μ_] := Module[
{ζ, ξ, η},
ζ = D[μ, h[z]];
ξ = ζ /. ((t[#]->0)& /@ ytails);
η = ζ /. ((t[#]->0)& /@ xtails);
μCollect[μ-h[z]ζ + h[x]ξ + h[y]η/(1+ξ /. t[s_]->c[s])]
]

hm[3,4,5][ar[1,3]+ar[2,4]] // μForm

hm[3,4,5][ar[1,3]+ar[2,4]] // hfac[5,{1}->3, 4]

(μ2 = (Subscript[α, 1]) ar[1,1] + (Subscript[α, 2]) ar[2,1] + (Subscript[α, 3]) ar[2,2] + (Subscript[α, 4]) ar[2,3]) // μForm

conj1 is designed to work only in the no-feedback case.

conj1[y_,x_][μ_] := Module[
{ξ, η, a},
ξ = D[μ, h[x]];
η = D[μ, t[y]];
a = a1 + a2 (ξ /. t[s_] :> c[s]);
μCollect[(μ /. t[y] -> a t[y]) + ξ η]
];

μ2 // conj1[1,2] // μForm

μ2 // conj1[1,2] // conj1[1,3] // hm[2,3,2] // μForm

μ2 //  hm[2,3,2] // conj1[1,2] // μForm

Solve[{
(Subscript[α, 1]) (a1+a2 c[2] (Subscript[α, 3])) (a1+a2 c[2] (Subscript[α, 4])) == (Subscript[α, 1]) (a1+a2 c[2] ((Subscript[α, 4])+(Subscript[α, 3]) (1+c[2] (Subscript[α, 4])))),
(Subscript[α, 2])+(Subscript[α, 1]) ((Subscript[α, 3])+(a1+a2 c[2] (Subscript[α, 3])) (Subscript[α, 4])) == (Subscript[α, 2])+(Subscript[α, 1]) ((Subscript[α, 4])+(Subscript[α, 3]) (1+c[2] (Subscript[α, 4])))
}, {a1, a2}]

conj2 is designed to work only in the feedback case.

conj2[y_,x_][μ_] := Module[
{γ},
γ = Coefficient[μ, ar[y,x]];
μCollect[μ /. t[y] -> t[y] / (1+0 a2 γ)]
];

(μ3 = (Subscript[α, 1]) ar[1,1] + (Subscript[α, 2]) ar[2,1] + (Subscript[α, 3]) ar[1,2] + (Subscript[α, 4]) ar[1,3]) // μForm

μ3 // conj2[1,2] // μForm

μ3 // conj2[1,2] // conj2[1,3] // μForm

μ3 // conj2[1,2] // conj2[1,3] // hm[2,3,2] // μForm

μ3 //  hm[2,3,2] //  μForm

μ3 //  hm[2,3,2] // conj2[1,2] // μForm